#include "mythread.h"
#include <iostream>

#include <qmutex.h>
#include <QWaitCondition>

void mssleep__(int ms)
{
    QMutex mutex;
    QWaitCondition sleep;
    mutex.lock();
    sleep.wait(&mutex, ms);
    mutex.unlock();
}


mythread::mythread()
{
    std::cout<<"mythread"<<std::endl;
}
void mythread::run()
{
    while(1)
    {
    std::cout<<"test thread"<<std::endl;
    mssleep__(1000);
    }
}


mythread::~mythread(){
    wait();
}
